008ce1f4bf00874ad1548f91dfc139fdaaebde59,app/src/main/java/net/yupol/transmissionremote/app/transport/request/TorrentSetRequest.java,Builder,build,#,186

Before Change


            JSONObject args = new JSONObject();
            try {
                args.put("ids", new JSONArray(Collections.singleton(torrentId)));
                if (filesWantedIndices != null && filesWantedIndices.length > 0) {
                    args.put("files-wanted", new JSONArray(Arrays.asList(ArrayUtils.toObject(filesWantedIndices))));
                }
                if (filesUnwantedIndices != null && filesUnwantedIndices.length > 0) {
                    args.put("files-unwanted", new JSONArray(Arrays.asList(ArrayUtils.toObject(filesUnwantedIndices))));

After Change


            JSONObject args = new JSONObject();
            try {
                args.put("ids", new JSONArray(Collections.singleton(torrentId)));
                if (ArrayUtils.isNotEmpty(filesWantedIndices)) {
                    args.put("files-wanted", intArray(filesWantedIndices));
                }
                if (ArrayUtils.isNotEmpty(filesUnwantedIndices)) {
                    args.put("files-unwanted", intArray(filesUnwantedIndices));
                }
                if (transferPriority != null) {
                    args.put("bandwidthPriority", transferPriority.getModelValue());
                }
                if (honorsSessionLimits != null) {
                    args.put("honorsSessionLimits", honorsSessionLimits);
                }
                if (downloadLimited != null) {
                    args.put("downloadLimited", downloadLimited);
                }
                if (downloadLimit != null) {
                    args.put("downloadLimit", downloadLimit);
                }
                if (uploadLimited != null) {
                    args.put("uploadLimited", uploadLimited);
                }
                if (uploadLimit != null) {
                    args.put("uploadLimit", uploadLimit);
                }
                if (seedRatioMode != null) {
                    args.put("seedRatioMode", seedRatioMode.getValue());
                }
                if (seedRatioLimit != null) {
                    args.put("seedRatioLimit", seedRatioLimit);
                }
                if (seedIdleMode != null) {
                    args.put("seedIdleMode", seedIdleMode.getValue());
                }
                if (seedIdleLimit != null) {
                    args.put("seedIdleLimit", seedIdleLimit);
                }
                if (ArrayUtils.isNotEmpty(priorityHight)) {
                    args.put("priority-high", intArray(priorityHight));
                }
                if (ArrayUtils.isNotEmpty(priorityNormal)) {
                    args.put("priority-normal", intArray(priorityNormal));